<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>{$title|default=''|htmlentities} – {$site.name|htmlentities}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta name="keywords" content="{$keywords|htmlentities}">
    <meta name="description" content="{$description|htmlentities}">
    <link rel="shortcut icon" href="__CDN__/assets/img/favicon.ico" />
    <link href="/assets/css/frontend.css" rel="stylesheet">
    <link href="/assets/css/common.css" rel="stylesheet">
    <script type="text/javascript">
        var require = {
            config: JSON.parse('{$config|json_encode}')
        };
    </script>
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
    <script src="__CDN__/assets/js/html5shiv.js"></script>
    <script src="__CDN__/assets/js/respond.min.js"></script>
    <![endif]-->
    <style> .activec{background:#fff !important; }</style>
</head>

<body>
    <div id="app">
        <div id="loading" ref="loadNode">
            <div id="loading-center">
                <div id="loading-center-absolute">
                    <div class="object" id="object_four"></div>
                    <div class="object" id="object_three"></div>
                    <div class="object" id="object_two"></div>
                    <div class="object" id="object_one"></div>
                </div>
            </div>
        </div>
        <header class="header">
            <div class="header-container">
                <div class="header-left">
                    <div class="header-logo" @click="handle('/',false)">
                        <img src="__CDN__/assets/img/logo.png" alt="Logo" class="header-logo">
                        <span class="header-title">{$site.name|htmlentities}</span>
                    </div>
                    <nav class="header-nav">
                        <a href="javascript:;" @click="handle(item.url,item.is_login)" :class="item.url =='/'?`nav-item active`:`nav-item`" v-for="(item,index) in head">{{item.name}}</a>
                    </nav>
                </div>
                <div class="header-right"  v-if="user">
                    <i class="fa fa-list-alt header-icon" @click="handle('/notice',false)"></i>
                    <div class="user-info" data-toggle="dropdown">
                        <img :src="user.avatar || '__CDN__/assets/img/avatar.png'" class="user-avatar">
                        <span class="user-name">{{ user.nickname }}</span>
                    </div>
                    <ul class="dropdown-menu">
                        <!-- User image -->
                        <li class="user-header" @click="handle('/user/info')">
                            <img :src="user.avatar" class="img-circle" alt="">
                            <p>
                                <div>{{ user.nickname }}</div>
                                <small>闻道ID:{{user.id}}</small>
                            </p>
                        </li>
                        <li class="user-body">
                            <div class="user-list" @click="handle('/user/info')">
                                <div>我的资料</div>
                                <i class="fa fa-chevron-right"></i>
                            </div>
                            <div  class="user-list" @click="handle('/user/favorites')">
                                <div>我的收藏</div>
                                <i class="fa fa-chevron-right"></i>
                            </div>
                            <div class="user-list" @click="handle('/user/adviser')">
                                <div>我的实战</div>
                                <i class="fa fa-chevron-right"></i>
                            </div>
                        </li>
                        <li class="user-body">
                            <div class="user-list" @click="handle('/user/list')">
                                <div>榜单明细</div>
                                <i class="fa fa-chevron-right"></i>
                            </div>
                        </li>
                        <!-- Menu Footer-->
                        <li class="user-footer">
                            <div>
                                <a href="/user/logout"><i class="fa fa-sign-out"></i>
                                    {:__('Logout')}</a>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="header-right" v-else   @click="handle('/login',false)">
                    <i class="fa fa-list-alt header-icon" ></i>
                    <div class="user-info">
                        <i class="fa fa-user-circle fa-fw header-icon" style="margin-right: 5px;"></i>
                        <span class="user-name">登录</span>
                    </div>
                </div>
                
            </div>
        </header>

        <section class="container">
            <div class="row">
                <div class="col-xs-12" style="position: relative;">
                    <img src="/assets/img/bg.jpg" width="100%" height="auto">
                    <div style="position: absolute; bottom: 30px; left:50px; color: #fff; font-size: 32px;">
                        谋士实战
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-9">
                    <div class="content" style="min-height: 50px;">
                        <div style="display: flex;align-items: center;">
                            <div style="display: flex; align-items: center;flex:1;">
                                <img src="{$adviser.image}" width="60px" height="60px">
                                <div style="margin-left: 10px;display: flex; flex-direction: column;">
                                    <div style="font-size: 18px; color:#000;margin-bottom: 5px">{$adviser.title}</div>
                                    <div style="font-size: 14px; color:#333;">{$adviser.description}</div>
                                </div>
                            </div>
                            <div style="width:90px;display: flex; flex-direction: column;">
                                <div data-id="{$adviser.is_edit}" style="text-align: right; font-size: 20px; cursor: pointer;"{eq name="$adviser['is_edit']" value='1'} @click="handlesc({$adviser.id})" {/eq}>
                                    <i class="fa fa-list-alt"></i>
                                </div>
                                <div style="font-size: 14px; color:#666;text-align: right;">已报名{$adviser.nums} 人</div>
                            </div>        
                        </div>
                    </div>
                    <div class="content" style="margin-top: 10px;min-height: 50px;">
                        <div style="display: flex;align-items: center;">
                            <a href="javascript:;" @click="handleAdviser('{$adviser.id}')" style="display:flex;align-items: center;border-radius: 15px;border:1px solid #fc8939; padding:4px 8px;">
                                <img src="/uploads/20250319/5b779420a8793d3c108ac233513fd178.png" width="20" height="20">
                                <span style="color:#fc8939;margin-left: 5px;">实战手册</span>
                            </a>
                            <a href="/adviser/author?id={$adviser.id}" style="display:flex;align-items: center;border:1px solid #fc8939; border-radius: 15px;padding:4px 8px; margin-left: 15px;">
                                <img src="/uploads/20250319/d136424954fd4d7a4530a718af0e4e3b.png" width="20" height="20">
                                <span style="color:#fc8939;margin-left: 5px;">谋士</span>
                            </a>
                            <a href="/adviser/lists?id={$adviser.id}" style="display:flex;align-items: center;border:1px solid #fc8939;border-radius: 15px; padding:4px 8px; margin-left: 15px;">
                                <img src="/uploads/20250319/987674f1b1c94c9f377d935f5f05c3a9.png" width="20" height="20">
                                <span style="color:#fc8939;margin-left: 5px;">实战好事</span>
                            </a>
                        </div>
                    </div>
                    <div class="content" style="margin-top: 10px;">    
                        <div class="content-header">
                            <div class="nav-tabs">
                                <a data-id="hot" href="javascript:;" :class="currentTab == 'about'?`nav-tab active`:`nav-tab`"  @click="handleCurrent('about')">简介</a>
                                <a data-id="featured" href="javascript:;" :class="currentTab == 'lists'?`nav-tab active`:`nav-tab`"  @click="handleCurrent('lists')">实战图</a>
                                <a data-id="all" href="javascript:;" :class="currentTab == 'log'?`nav-tab active`:`nav-tab`"  @click="handleCurrent('log')">日志</a>
                            </div>
                        </div>
                        <div style="padding:15px;" v-if="currentTab == 'about'">
                            {$adviser.content}
                        </div>
                        <div style="padding:15px;display:flex;flex-direction: column;background:#f3f4f3" v-if="currentTab == 'lists'">
                            {volist name="arttype" id="vo"}
                            <div style="display: flex; margin-bottom: 15px; flex-direction: column;">
                                <div style="display:flex;align-items: center; background:#e6dcd5; border-radius: 10px 10px 0 0;">
                                    <div style="padding: 5px 10px;border-radius: 10px 0 0 0; background:#fc8939;color:#fff;font-size: 16px;">{$vo.title}</div>
                                    <div style="padding: 5px 10px;border-radius: 0 10px 0 0; color:#fc8939;font-size: 12px;">{$vo.description}</div>
                                </div>
                                {volist name="article" id="v"}
                                {eq name="v.type_id" value="$vo.id"}
                                <a style="display:flex;align-items: center; background:#fff;padding:5px 10px;border-bottom: 1px solid #f9f9f9;" href="/adviser/guide?id={$adviser.id}" >
                                    <div style="flex:1;color:#333"><span style="color:#fc8939;margin-right: 10px;">{$key+1}</span>{$v.title}</div>
                                    <i class="fa fa-chevron-right" style="color:#999"></i>
                                </a>
                                {/eq}
                                {/volist} 
                            </div>
                            {/volist}
                        </div>
                        <div style="padding:15px;display:flex;flex-direction: column;" v-if="currentTab == 'log'">
                            <div style="display: flex;align-items: center; padding-bottom: 15px;">
                                <div style="flex:1;font-size: 16px;">实战日志</div>
                                <div style="display: flex; border:2px solid #eee;background:#eee;">
                                    <div style="font-size: 14px; color:#000;padding:4px 8px;" data-tabs="0" class=" tabtags activec">全部</div>
                                    <div style="font-size: 14px; color:#000;padding:4px 8px;" :data-tabs="user.id" class=" tabtags">我的</div>
                                </div>
                            </div>
                            {volist name="log" id="vo"}
                            <div class="logItem" id="log-{$vo.id}" data-ids="0,{$vo.user.id}" style="display:flex; flex-direction: column; border-bottom: 1px solid #f1f1f1;margin-bottom: 15px;">
                                <div style="display: flex;align-items: center;">
                                    <img src="{$vo.user.avatar}" width="40" height="40" style="border-radius: 50%;">
                                    <div style="margin-left: 10px;display: flex; flex-direction: column;">
                                        <div style="font-size: 14px; color:#000;">{$vo.user.nickname}</div>
                                        <div style="font-size: 12px; color:#999;">{$vo.createtime}</div>
                                    </div>
                                </div>
                                {volist name="$vo.data" id="v"}
                                    <div style="padding:5px;color:#000">{$v.title}</div>
                                    <div style="padding:5px;color:#999">{$v.value}</div>
                                {/volist}
                            </div>
                            {/volist}
                        </div>
                    </div>
                </div>
                <div class="col-xs-3">
                    <div style="padding:15px;background-color: #fff;display: flex; flex-direction: column;">
                        {eq name="adviser.is_canjia" value="1"}
                            {if condition="($adviser['start_time'] < time()) && ($adviser['end_time'] > time()) "}
                            <div style="display: flex; font-size: 16px; color:#000;margin-bottom:15px;"> 活动开始</div>
                            <div class="progress" style="background-color: #ffdeab;margin-bottom:15px;">
                                <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
                                    <span class="sr-only">60% Complete (warning)</span>
                                </div>
                            </div>
                            <a href="javascript:;" class="btn btn-block btn-warning" @click="handledaka({$adviser.id})">参与打卡</a>
                            {/if}
                            {if condition=" ($adviser['end_time'] < time()) "}
                            <div style="display: flex; font-size: 16px; color:#000;margin-bottom:15px;"> 活动结束 </div>
                            <div class="progress" style="background:#a3a3a3;margin-bottom:15px;">
                                <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%"></div>
                                    <span class="sr-only">0% Complete (warning)</span>
                                </div>
                            </div>
                            <a href="javascript:;" class="btn btn-block btn-default"  style="background-color: #727583;color:#fff;">停止打卡</a>
                            {/if}
                            {if condition=" ($adviser['after_time'] < time()) "}
                            <div style="display: flex; font-size: 16px; color:#000;margin-bottom:15px;">
                                已参与活动
                            </div>
                            <div class="progress" style="background-color: #ffdeab;margin-bottom:15px;">
                                <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
                                    <span class="sr-only">60% Complete (warning)</span>
                                </div>
                            </div>
                            <a href="javascript:;" class="btn btn-block btn-warning">已报名</a>
                            {/if}
                        {else/}
                        <div style="display: flex; justify-content: flex-end ; font-size: 16px; color:#fc8939;margin-bottom:15px;">
                            ￥{$adviser.price}
                        </div>
                        {if condition=" ($adviser['after_time'] < time()) "}
                        <div style="display: flex; font-size: 16px; color:#000;margin-bottom:15px;">
                            立即参与活动
                        </div>
                        
                        <a href="javascript:;" class="btn btn-block btn-warning" @click="handlebm({$adviser.id})">参与报名</a>
                        {else/}
                        <div style="display: flex; font-size: 16px; color:#000;margin-bottom:15px;">
                            未参与本次活动
                        </div>
                        <a href="javascript:;" class="btn btn-block btn-default"  style="background-color: #727583;color:#fff;">停止报名</a>
                        {/if}
                        <span style="margin-top: 15px;"><span style="color:#999">截止报名：</span>{$adviser['after_time']|date="m月d日",###}
                                {switch name=":date('w',$adviser['after_time'])"}
                                {case value='0'} 周日 {/case}
                                {case value='1'} 周一 {/case}
                                {case value='2'} 周二 {/case}
                                {case value='3'} 周三 {/case}
                                {case value='4'} 周四 {/case}
                                {case value='5'} 周五 {/case}
                                {case value='6'} 周六 {/case}
                                {/switch} 23:59
                        </span>
                        {/eq}
                    </div>  
                </div>
            </div>
        </section>
    </div>
</body>
<script src="/assets/js/require.js" data-main="/assets/js/require-frontend.js?v={$site.version|htmlentities}"></script>
</html>
